<script setup lang="ts">
import PaletteButton from '@/components/PaletteButton/index.vue'
import Footer from '@/components/Footer/index.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import Cookies from 'js-cookie'
import { useAuth } from '@/stores/index'

const { setToken } = useAuth()

const token = Cookies.get('token')

if (token) {
    setToken(token)
}

</script>

<template>
    <el-config-provider :locale="zhCn">
        <router-view />
    </el-config-provider>
    <Footer />
    <PaletteButton />
</template>

<style lang="scss">
.el-table__empty-text {
    font-family: 'SOURCEHANSANSCN-EXTRALIGHT';
}
</style>
